/**
 Copyright (C) 2013 Yuyao Liang

 This source code is release under the BSD License.

 This program is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE.  See the license for more details.

 Created on Oct 23, 2013 4:21:23 PM
 */
package com.google.srclib.stock;

import java.util.concurrent.Callable;

import com.google.srclib.dataset.StockRecordDataset;

/**
 * @author lianyuy
 * 
 */
public class StockDatasetUpdater implements Callable<StockRecordDataset> {
	private StockDataCollector getter = StockDataCollector.getInstance();
	private String stock;
	private StockRecordDataset sd;

	public StockDatasetUpdater(String stock, StockRecordDataset sd) {
		super();
		this.stock = stock;
		this.sd = sd;
	}

	@Override
	public StockRecordDataset call() throws Exception {
		return getter.getStockData(stock, sd);
	}

}
